using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using QJY.Data;

namespace QJY.WEB
{
    public class HtmlModule : IHttpModule
    {
        

        public void Init(HttpApplication app)
        {
            app.BeginRequest += new EventHandler(app_BeginRequest);
        }

        void app_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;
            if (app.Request.FilePath.Contains("login.html"))
            {
                if (null != app.Request.Cookies["szhlcode"])
                {
                    string val = app.Request.Cookies["szhlcode"].Value;
                }
            }
            if (null != app.Request.Cookies["CorpNum"])
            {
                string corpnum = app.Request.Cookies["CorpNum"].Value;
                KFDBActSet.ActNum = corpnum;
                if(!KFDBActSet.ActNum2ConString.ContainsKey(corpnum))
                    KFDBActSet.ActNum2ConString[corpnum] = new Kf.Center.DBInfo.PropsStr.PropsStr().GetActSetPropsStr(corpnum, 0);
            }

        }


        public void Dispose() { }
    }
}